#ifndef ROBOTMAP_H
#define ROBOTMAP_H


/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring, makes checking
 * the wiring easier and significantly reduces the number of magic numbers
 * floating around.
 */
 

class RobotMap {
public:
	static const int DIGITAL_MODULE_SLOT = 1;
	static const int ANALOG_MODULE_SLOT = 1;
	static const int SOLENOID_MODULE_SLOT = 1;
	
	static const float SPINNING_FLYWHEEL_TIMEOUT = 0.5;
	
	//Operator Control
	static const int OP_CTRL_LEFT_STICK_PORT = 2;
	static const int OP_CTRL_RIGHT_STICK_PORT = 1;
	static const int OP_CTRL_RAMP_ARM_STICK_PORT = 3;
	
	static const int OP_CTRL_HIGH_SPEED_BUTTON = 1;
	static const int OP_CTRL_LOW_SPEED_BUTTON = 1;
	static const int OP_CTRL_DRIVE_FORWARD_BUTTON = 2;
	static const int OP_CTRL_DRIVE_REVERSE_BUTTON = 2;
	
	static const int OP_CTRL_KINECT_STICK_LEFT = 1;
	static const int OP_CTRL_KINECT_STICK_RIGHT = 2;
	
	static const int OP_CTRL_KINECT_ENGAGE_BTN = 9;
	static const int OP_CTRL_KINECT_SHOOT_THE_BALLS_BTN = 5;
	
	//Buttons and sensors on the Cypress board
	static const int OP_CTRL_CY_PRECISION_DRIVING_ON_OFF = 3;
	static const int OP_CTRL_CY_SHOOT_THE_BALLS = 5;
	static const int OP_CTRL_CY_BALL_FEEDER_ON_OFF = 4;
	
	static const int OP_CTRL_CY_PRECISION_DRIVING_STAT = 16;
	static const int OP_CTRL_CY_BALL_1_STAT = 14;
	static const int OP_CTRL_CY_BALL_2_STAT = 10;
	static const int OP_CTRL_CY_BALL_3_STAT = 12;
	static const int OP_CTRL_CY_BALL_FEEDER_STAT = 15;
	static const int OP_CTRL_CY_SHOOTING_STAT = 7;
	
	static const int OP_CTRL_CY_UPPER_FLYWHEEL_MOTOR_SPEED = 8;
	static const int OP_CTRL_CY_LOWER_FLYWHEEL_MOTOR_SPEED = 7;
	
	//traction motors and relays
	static const int TRACTION_LEFT_MOTOR_1 = 2;
	static const int TRACTION_LEFT_MOTOR_2 = 3;
	static const int TRACTION_RIGHT_MOTOR_1 = 7;
	static const int TRACTION_RIGHT_MOTOR_2 = 6;
	
	static const int TRACTION_DRIVING_DIRECTION_RLY = 2;
	
	//all other robot motors
	static const int OTHER_RAMP_ARM_MOTOR = 8;
	static const int OTHER_BALL_FEEDER_MOTOR = 9;
	static const int OTHER_BRUSH_MOTOR = 1;
	static const int OTHER_FLYWHEEL_MOTOR_1 = 4;
	static const int OTHER_FLYWHEEL_MOTOR_2 = 5;
	static const int OTHER_DIGI_CAMERA_Y_AXIS = 10;
	
	
	//pneumatic hardware control 
	
	//========== compressor control
	static const int PNEU_PRESSURE_SWITCH = 1;
	static const int PNEU_COMPRESSOR_RLY = 1;
	
	//========== valves
	static const int PNEU_LOW_GEAR_POS = 3;
	static const int PNEU_HIGH_GEAR_POS = 1;
	static const int PNEU_GATE_CLOSED_POS = 4;
	static const int PNEU_GATE_OPEN_POS = 2;
	
	//feedback from robot sensorium
	static const int FEED_BALL_1_SENS = 3;
	static const int FEED_BALL_2_SENS = 4;
	static const int FEED_BALL_3_SENS = 2;
	
	static const int FEED_RAMP_ARM_DOWN = 5;
	static const int FEED_RAMP_ARM_UP = 6;
};

#endif
